using System;
using System.Collections.Generic;
using System.Text;

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Content;

namespace PartBuilder
{
	public class PreviewControl : GraphicsDeviceControl
	{
		ContentManager content;
		public ContentManager Content { get { return content; } }

		public EditablePart SelectedPart = null;

		public Point SelectedIndex;

		LineBatch lb;

		protected override void Initialize()
		{
			content = new ContentManager(Services, "Content");
			lb = new LineBatch(this);

		}

		protected override void Draw()
		{
			GraphicsDevice.Clear(Color.CornflowerBlue);
			if (SelectedPart != null)
			{
				lb.Begin();
				lb.Draw(SelectedPart, SelectedIndex);
				lb.End();
			}
				
		}
	}
}
